Sell your soul
Believeth in me an hath everlasting life
Sharp Stuff
Switchblades Icepicks and german knives
Evil gear
Christmas is almost here
Till death do us part
Axels New Music releases

here are some of the best and useful php scripts and snippets to help in your projects. Php displayed below. Use the search for specific script lookups. Click the category links to view scripts in Javascript and cgi. To add your own script click the link and add your useful script example.

dynamic table from delimited file data array return by column index
table build dynamic column array table fgetscsv delimited csv file array associative

<?php

$row 
1;
if ((
$handle fopen("cart-data2.txt""r")) !== FALSE) {
   
    echo 
'<table border="1">';
   
    while ((
$data fgetcsv($handle1000";")) !== FALSE) {
        
$num count($data);
        if (
$row == 1) {
            echo 
'<thead><tr>';
        }else{
            echo 
'<tr>';
        }
       
        for (
$c=0$c $num$c++) {
            
//echo $data[$c] . "<br />\n";
            
if(empty($data[$c])) {
               
$value "&nbsp;";
            }else{
               
$value $data[$c];
            }
            if (
$row == 1) {
                echo 
'<th>'.$value.'</th>';
            }else{
                echo 
'<td>'.$value.'</td>';
            }
        }
       
        if (
$row == 1) {
            echo 
'</tr></thead><tbody>';
        }else{
            echo 
'</tr>';
        }
        
$row++;
    }
   
    echo 
'</tbody></table>';
    
fclose($handle);
}

?>


Add your comment.













No comments yet

Search ScriptsnTips


Php JavaScripts CGI/Perl